package com.lottery.utils.playUtils;

import javafx.scene.effect.Light;

import java.util.*;

public class test {
    public static void main(String[] args) {
        String opencod = "2,3,4,1,7";
        //顺子玩法
        SscPlayUtilsNoNum ssc = new SscPlayUtilsNoNum(opencod);
        if (ssc.shunzi("顺子前")) {
            System.out.println("恭喜你顺子中奖了");
        } else {
            System.out.println("恭喜你顺子没中奖了");
        }

        //豹子玩法
        if (ssc.baoZi("豹子前")) {
            System.out.println("恭喜你豹子前中奖了");
        } else {
            System.out.println("恭喜你豹子前没中奖了");
        }


        //定位胆玩法
        SscPlayUtilNum num = new SscPlayUtilNum(opencod);
        if (num.dingWeiDan("定位胆1/2")) {
            System.out.println("恭喜您定位胆玩法中奖了");
        } else {
            System.out.println("定位胆没中奖");
        }

        //前中后三码玩法
        if (num.renSan("前中后三码前456")) {
            System.out.println("前中后三码中奖了");
        } else {
            System.out.println("前中后三码没中奖");
        }

        //组六复式玩法
        if (num.zuLiu("组六复式前345")) {
            System.out.println("组六复式中奖了");
        } else {
            System.out.println("组六复式没中奖");
        }
        //前三任选一码
        if (num.renYi("前三任选一码2")) {
            System.out.println("前三任选一码中奖了");
        } else {
            System.out.println("前三任选一码没中奖");
        }
        //数字倍率玩法
        if (num.beiLv("一帆风顺2")) {
            System.out.println("数字倍率中奖了");
        } else {
            System.out.println("数字倍率没中奖了");
        }

        //斗牛玩法
        //if(num.douNiu("牛一")){
        if (num.douNiu("牛四")) {
            System.out.println("斗牛中奖了");
        } else {
            System.out.println("斗牛没中奖了");
        }

        //任选二码组合玩法
        if (num.renEr("任选二码组合26")) {
            System.out.println("任选二码组合中奖了");
        } else {
            System.out.println("任选二码组合没中奖");
        }
        //组合玩法(作为最后的开奖条件调用,不然会抛出下标越界)
        if (num.group("五星无码22232")) {
            System.out.println("恭喜你组合玩法中奖了");
        }
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(1);
        list.add(1);
        list.add(1);
        List<Integer> list2 = new ArrayList<>();
        for (int i :list){
            list2.add(i);
        }
        list2.remove(2);
        System.out.println(list.size()+"::"+list2.size());

        boolean flg = false;
        String opencode = opencod.replace(",","");

        Set<String> set = new HashSet<>();
        for(int i = 0 ; i<5;i++){
            try {
                String ss =opencode.substring(i,i+1);
                set.add(ss);
            }catch (Exception e){
            }
        }
        if(set.size() == 5){
            flg=true;
        }
        System.out.println(flg);

    }


}
